package com.itheima.stock.controller;

import com.itheima.stock.domain.StockUpDownListDomain;
import com.itheima.stock.domain.StockUpdownDomain;
import com.itheima.stock.service.StockUpDownService;
import com.itheima.stock.vo.resp.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @ClassName StockUpDownController
 * @Description 涨跌停
 * @date 2023/3/2 14:26
 * @Version 1.0
 */
@RestController
@RequestMapping
public class StockUpDownController {

    @Autowired
    StockUpDownService stockUpDownService;

    @GetMapping("/api/quot/stock/updown")
    public R<Map> getStockUpdown(){
        return stockUpDownService.getStockUpdown();
    }

    @GetMapping("/api/quot/stock/tradevol")
    public R<Map> getTradevol(){
        R<Map> map = stockUpDownService.getTradevol();
return map;
    }

    @GetMapping("/api/quot/stock/updown/count")
    public R<StockUpDownListDomain> getUpDown(){
        R<StockUpDownListDomain> rest =   stockUpDownService.getStockUpdownDomain();

        return  rest;

    }

}
